home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- #
- # uucdebat, uubatch version 1.0.5
- #
- # The command that should be executed is : "uncompress | uudebat".
- # It is best to use absolute file name and paths here, since it is
- # critical not to miss...
- #
- # Some check was addedd for those who install before they read the
- # instructions. In that case, having some critical files in
- # other-then-expected pathneme may cause uucdebat to silently eat all
- # incomming mail, unless these checks are mnade.
- #
- # If you do read this, you may want to take out those checks, after verifying
- # teh filenames. The only line that is neccsary from uucdabat functional
- # point of view is:
- #
- # /usr/ucb/uncompress | /usr/bin/uudebat
- #
- UNCOMP=/usr/ucb/uncompress
- UNZIP=/usr/local/bin/unzip
- UUDEBAT=/usr/bin/uudebat
- FCAT=/usr/local/bin/fcat
-
- #
- # This is the user error is mailed to.
- #
- USER=uucp
-
- report_error () { \
- ( \
- echo "uucdebat : Incorrect configuration. Mail may have been lost.";
- echo " please check some pathnemss:" ;
- echo " specificaly, there is no compressor at $1";
- echo " or no uudebat at $UUDEBAT";
- ) \
- | mail -s "uucdebat configuration error" $USER
- };
-
- case $1 in
- unzip|zip|-unzip|-zip)
- if test -x $UNZIP -a -x $UUDEBAT ;
- then
- $UNZIP -p | $UUDEBAT
- else
- report_error $UNZIP;
- fi;;
-
- freeze|melt|-freeze|-melt)
- if test -x $FCAT -a -x $UUDEBAT ;
- then
- $FCAT -p | $UUDEBAT
- else
- report_error $FCAT;
- fi;;
-
- uncompress|compress|-uncompress|-compress|"")
- if test -x $UNCOMP -a -x $UUDEBAT ;
- then
- $UNCOMP -c | $UUDEBAT
- else
- report_error $UNCOMP;
- fi;;
-
- *)
- ( \
- echo "uucdebat : Unknown compression scheme ($1). Mail may have been lost";
- ) \
- | mail -s "uucdebat configuration error" $USER
- esac
-